{include file="common:head" /}
<link rel="stylesheet" type="text/css" href="__STATIC__/index/css/video.css">

<body>
<div class="index-content">
    <!-- 头部 -->
    {include file="common:header" /}
    <!-- 视频广场 -->
    <div class="square width1300">
        <div class="title">
            <div class="title-left fl"><span class="title-icon"></span>视频广场</div>
            <div class="title-right fl">
                <ul>
                    <li class="cccvideo {if $cate_id eq 0 } light {/if}"  >全部</li>
                    {volist name="cate_list" id = "item"}
                    <li class="cccvideo {if $item.id eq $cate_id} light {else/}{/if}" data-title="cate_id" data="{$item.id}">{$item.name}</li>
                    {/volist}

                </ul>
            </div>
            <hr/>
        </div>
        <div class="content">
            <div class="content-tab">
                <ul style="margin-right: 66px;display: inline-block;">
                    <li class="{if $zuixing neq '' && $cate_id eq 0} light2 {/if} cccvideo"  data-title='zuixing'  >最新发布</li>
                    <li class="{if $zuiduo neq ''} light2 {else/}{/if} cccvideo"  data-title='zuiduo'  >更多播放</li>
                    <li class="{if $haoche neq ''} light2 {else/}{/if} cccvideo"   data-title='haoche'  >好车推荐</li>
                </ul>
            </div>
            <div class="con clearfix">
                <div class="con-left fl">
                    <ul>
                        {volist name="video_list" id = "item" empty="暂无数据"}
                        <li onclick="openwin('{:url(\'index/video/video_detail\')}' + '?id=' + {$item.id})">
                            <img class="car-img" src="{$item.image}" alt="">
                            <p class="over-hide">{$item.title}</p>
                            <div class="info">
                                <div class="num fl">
                                    <span><img class="icon-img" src="__STATIC__/index/img/bofangliang_1.png" alt=""></span>
                                    <span>{$item.view}</span>
                                    <span><img class="icon-img" src="__STATIC__/index/img/pinglunliang.png" alt=""></span>
                                    <span>{$item.number}</span>
                                </div>
                                <div class="date">{$item.create_time|date="Y-m-d"}</div>
                            </div>
                        </li>
                        {/volist}

                    </ul>
                </div>
                <div class="con-right fl">
                    <ul>
                        {volist name="right_video" id="item"}
                        <li>
                            <div class="car-img fl">
                                <img class="car-play" src="{$item.image}" alt="">
                                <span class="sort">{$i}</span>
                            </div>
                            <div class="car-txt" onclick="openwin('{:url(\'index/video/video_square\')}' + '?cate_id=' + {$item.id})">
                                <p class="over-hides">{$item.title}</p>
                                <div class="num">
                                    <span><img class="icon-img" src="__STATIC__/index/img/bofangliang_1.png" alt=""></span>
                                    <span>{$item.view}</span>
                                    <span><img class="icon-img" src="__STATIC__/index/img/pinglunliang.png" alt=""></span>
                                    <span>{$item.number}</span>
                                </div>
                            </div>
                        </li>
                        {/volist}

                    </ul>
                </div>
            </div>
        </div>
        <div class="pagina">
            <div class="page">
                {$video_list|raw}
            </div>
        </div>
    </div>


    {include file="common:footer" /}
</div>
<script type="text/javascript" src="__STATIC__/index/js/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="__STATIC__/index/js/swiper.min.js"></script>
<script type="text/javascript" src="__STATIC__/index/js/common.js"></script>
<script type="text/javascript" src="__STATIC__/index/js/header_move.js"></script>

<script type="text/javascript">


    // /$(function () {
    $('.cccvideo').click(function (){
        var uri = '?';
        a=location.href;
        var arrUrl = a.split("?");
        // alert(arrUrl[0]);


        var index = a.indexOf("?");
        var catId = a.substring(index+1,a.length);

            //alert(catId);
            var cate_id = $(this).attr('data-title');
            if( cate_id == 'cate_id' ) {
                var ids = $(this).attr('data');
                uri += 'cate_id='+ids;
            }

            if(cate_id == 'zuixing') {
                uri += 'zuixing=true'
            }

            if(cate_id == 'zuiduo') {
                uri += 'zuiduo=true'
            }

            if(cate_id == 'haoche') {
                uri += 'haoche=true'
            }



            //alert(cate_id);
            console.log(uri)
            location.href=arrUrl[0]+uri;
    })
    // })


    var swiper = new Swiper('.swiper-container', {
        autoplay:true,
        navigation: {
            nextEl: '.swiper-button-next',
            prevEl: '.swiper-button-prev',
        },
    });
    var swiper2 = new Swiper('.evaluation-container', {
        slidesPerView: 4,
        spaceBetween: 7
    });


</script>
</body>
</html>
